import java.util.*;

/*
	Tester class for Part2.

	This class creates some shapes, then sorts them using Arrays.sort,
	which utilizes the fact that Shape class implements the
	Comparable interface.

	Make sure your results are the same as the output file associated with this
	problem.

	DO NOT MODIFY THE CONTENTS OF THIS FILE.

*/

public class Part2Tester
{
	private static int MAX_SHAPES = 10;

	public static void main(String [] args)
	{
		Shape [] shapes = new Shape[MAX_SHAPES];

		shapes[0] = new Square(4);
		shapes[1] = new Circle(1);
		shapes[2] = new Square(8);
		shapes[3] = new Circle(2);
		shapes[4] = new Square(4);
		shapes[5] = new Square(4);
		shapes[6] = new Circle(1);
		shapes[7] = new Square(8);
		shapes[8] = new Circle(2);
		shapes[9] = new Square(4);
		System.out.println("10 shapes created, here they are...");
		for (int i = 0; i < shapes.length; i++)
			System.out.println( shapes[i] );

		System.out.println("\nNow call Arrays.sort which utilizes Shape's compareTo and print new list...");
		Arrays.sort(shapes);

		for (int i = 0; i < shapes.length; i++)
			System.out.println(shapes[i]);


	}// end main method

}//end class ShapeTester